<template>
	<view>
		<view class="search">
			<u--input v-model="query.searchValue" placeholder="主题关键词" :clearable="true" prefixIcon="search"
				prefixIconStyle="font-size: 22px;color: #909399" @clear="getList()">
				<template slot="suffix">
					<view class="search_btn" @click="getList()"> 搜索</view>
				</template></u--input>
		</view>
		<view class="box" v-for=" (v,i) in datas" :key="i" @click="jumpTo('/pages/securityDynamicManagement/detatl',{
			'title':v.title,
			 'id':v.id })"  >
			<view class="box_item" style="margin-top: 0;">
				<view class="box_label">动态类别：</view>
				<view class="box_value">{{v.actTypeStr}}</view>
			</view>
			<view class="box_item">
				<view class="box_label">活动主题：</view>
				<view class="box_value">{{v.title}}</view>
			</view>
			<view class="box_item">
				<view class="box_label">创建人：</view>
				<view class="box_value">{{v.createUserStr}}</view>
			</view>
			<view class="box_item">
				<view class="box_label">创建时间：</view>
				<view class="box_value">{{v.createDate}}</view>
			</view>

		</view>
		<u-empty mode="list" v-if="datas.length<=0" marginTop="80">
		</u-empty>
	</view>
</template>

<script>
	import {
		trendsList,
		trendsGetInfo,
	} from '@/api/securityDynamicManagement.js'


	export default {
		data() {
			return {

				query: {
					
					searchValue: '',
					orderNumber: '',
					queryType: 4
				},
				datas: [],
				options: [],
			};
		},
		watch: {

		},
		onLoad() {
			const page = getCurrentPages()
			console.log(page[0].route); // 打印当前页面栈
			console.log(this.$mp.query, "query");
			if (this.$mp.query.token) {
				uni.setStorageSync('token', this.$mp.query.token)
			}

		},
		onShow() {
			this.getList()
		},
		methods: {
			async getList() {
				trendsList({
					PAGE_NO: 1,
					PAGE_SIZE: 100000,
					...this.query,
				}).then(res => {
					console.log(res, "res");
					this.datas = res.rows
				})
			},
		}
	}
</script>

<style>
	page {
		background-color: #F6F6F6;
	}
</style>
<style lang="scss" scoped>
	.search {

		/deep/.u-input {
			width: 688rpx;
			height: 65rpx;
			background: #FFFFFF;
			border: 1rpx solid #CCCCCC;
			margin: 0 auto;
			margin-top: 15rpx;
			border-radius: 32rpx;
		}

		&_btn {
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 29rpx;
			color: #666666;
			padding-left: 10rpx;
			border-left: 1rpx solid #E0E0E0;
		}
	}

	.box {
		width: 721rpx;
		background: #FFFFFF;
		margin: 0 auto;
		margin-top: 23rpx;
		border-radius: 15rpx;
		padding: 20rpx 20rpx;

		&_herder {
			padding: 30rpx 15rpx 25rpx 15rpx;
			border-bottom: 1rpx solid #F5F5F5;

			&_left {
				font-weight: 400;
				font-size: 33rpx;
				color: #1F1F1F;
				font-style: normal;
			}

			&_right {
				background: #FFDFDC;
				border-radius: 10rpx;
				border: 1rpx solid #E04734;
				padding: 14rpx 18rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				font-size: 25rpx;
				color: #E04734;
			}

			&_right1 {
				background: #FFECDC;
				border-radius: 10rpx;
				border: 1rpx solid #E08A34;
				padding: 14rpx 18rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				font-size: 25rpx;
				color: #E08A34;
			}
		}

		&_item {
			display: flex;
			align-items: center;
			margin-top: 30rpx;
			padding: 0 15rpx;

			&_btn {
				margin-top: 30rpx;
				border-top: 1rpx solid #F5F5F5;
				display: flex;
				// justify-content: right;
				padding-top: 33rpx;
				padding-bottom: 23rpx;
				// padding-right: 30rpx;
				justify-content: flex-end;

				&_left {
					width: 171rpx;
					height: 63rpx;
					background: #F6A234;
					border-radius: 31rpx;

					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
					font-size: 25rpx;
					color: #FFFFFF;
					line-height: 63rpx;
					text-align: center;
					// margin-right: 38rpx;
				}

				&_right {
					width: 171rpx;
					height: 63rpx;
					background: #267DFF;
					border-radius: 31rpx;
					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
					font-size: 25rpx;
					color: #FFFFFF;
					line-height: 63rpx;
					text-align: center;
					font-style: normal;
					margin-left: 38rpx;
				}
			}
		}

		&_label {
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 29rpx;
			color: #999999;
		}

		&_value {
			font-weight: 400;
			font-size: 29rpx;
			color: #1F1F1F;
		}
	}

	/deep/.placeholderClass {
		font-weight: 400;
		font-size: 33rpx;
		color: #CCCCCC;
	}
</style>